.386
.model flat, stdcall
option casemap :none

	include	\masm32\include\windows.inc
	include \masm32\include\kernel32.inc
	include \masm32\include\user32.inc

	includelib \masm32\lib\kernel32.lib
	includelib \masm32\lib\user32.lib

	DialogProc proto :DWORD, :DWORD, :DWORD, :DWORD

.data?
hInstance   HINSTANCE ?
CommandLine LPSTR ?

.code
start:

invoke	GetModuleHandle, NULL
mov	hInstance, eax
invoke	GetCommandLine
mov	CommandLine, eax
invoke	DialogBoxParam, hInstance, 1001, NULL, addr DialogProc, 0
invoke	ExitProcess, eax

DialogProc proc hDlg:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
	.if uMsg == WM_INITDIALOG
	.elseif uMsg == WM_COMMAND
		invoke SendMessage, hDlg, WM_CLOSE, 0, 0
	.elseif uMsg == WM_CLOSE
		invoke EndDialog, hDlg, 0
		ret
	.endif
	xor	eax, eax
	ret
DialogProc endp

end start
